import request from '@/utils/request'
import { AxiosPromise } from 'axios'

enum Api {
  summary = '/analyze/summary',
  chargerCategory = '/analyze/chargerCategory',
  chargerState = '/analyze/chargerState',
  saleStatistics = '/analyze/saleStatistics',
}

// 获取列表
export const analyzeSummary = (data: any): AxiosPromise<any> => {
  return request({
    url: Api.summary,
    method: 'post',
    data,
  })
}

export const analyzeChargeCategory = (data: any): AxiosPromise<any> => {
  return request({
    url: Api.chargerCategory,
    method: 'post',
    data,
  })
}

export const analyzeChargeState = (data: any): AxiosPromise<any> => {
  return request({
    url: Api.chargerState,
    method: 'post',
    data,
  })
}

export const analyzeSaleStatistics = (data: any): AxiosPromise<any> => {
  return request({
    url: Api.saleStatistics,
    method: 'post',
    data,
  })
}

